<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<HTML>
<HEAD>
<base href="${pageContext.request.contextPath}/"/>

<TITLE>搜房网租房</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

<link href="style/mycss.css" rel="stylesheet" type="text/css" />
<link href="style/texts.css" rel="stylesheet" type="text/css" />
<link href="style/btn.css" rel="stylesheet" type="text/css" />
	<script src="js/jquery-2.2.4.js" type="text/javascript"></script>

<script type="text/javascript">
$(function () {
	$.get('house/loaddistrict', function (resp) {

		//处理响应的json数据
		var qx = $('#qxid');
		$.each(resp, function (index,item) {
			console.log(item);
			qx.append(new Option(item.name, item.id));
		});
	},'json');

	// 当选择区县时，异步加载街道的数据
	$('#qxid').change(function () {
		// 区县
		var qx = $(this);
		// 街道
		var street = $('#streetId');
		street.empty();
		$.get('house/loadstreet',{districtId: qx.val()},function (resp) {
			street.append(new Option('请选择---'));
			$.each(resp, function (index, item) {
				street.append(new Option(item.name, item.id));
			})
		},'json');
	});

})


</script>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>

<table width="780" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td colspan="5"><img src="images/top.jpg" width="780" height="213"></td>
  </tr>
  <tr>
    <td colspan="5"><img src="images/middle1.jpg" width="780" height="47"></td>
  </tr>
  <tr>
    <td width="38" background="images/middle2.jpg">&nbsp;</td>
    <td width="172" valign="top">
	<table align="center">
	<tr>
		<td width=''><font color='red'>当前用户：${sessionScope.logonUser.username }</font>
		</td>
	</tr>
	<tr>
		<td width='150'><a href="house/find_for_me?userId=${sessionScope.logUser.userId}">管理我的租房信息</a></td>
	</tr>
	<tr>
		<td width='100'><a href="views/post.jsp">发布租房信息</a></td>
	</tr>
	<tr>
		<td width='100'><a href="house/search">返回首页</a></td>
	</tr>
	<tr>
		<td width='100'><a href="index.htm">[注销]</a></td>
	</tr>
	</table>
</td>
    <td width="35" background="images/layout_24.gif">&nbsp;</td>
    <td width="495">

	<form action="house/insert" method="post" name="mf">

		<input type="hidden"  name="userId" value="${sessionScope.logUsersInfo.userId}">

		<table>
			<tr>
				<td colspan="2">发布租房信息：</td>
			</tr>
			<tr>
				<td colspan="2"><hr/></td>
			</tr>
			<tr>
			  	<td style="width: 70px;"><strong>标题：</strong></td>
				<td><input type="text" name="title" id="title"></td>
			</tr>
			<tr>
			  	<td><strong>区县：</strong></td>
				<td>
					<select id="qxid" style="width:110px">
						<option value=''>不限--</option>
					</select>
				</td>
			</tr>
			<tr>
			  <td><strong>街道：</strong></td>
				<td>
					<select id="streetId" name="streetId" style="width:110px">
						<option value="">不限--</option>
					</select>
				</td>
			</tr>
			<tr>
			  <td><strong>租金：</strong></td>
				<td><input type="text" name="price" id="price">元/月</td>
			</tr>
			<tr>
			  	<td><strong>房间数：</strong></td>
				<td>
					<select name="room" >
						<option value="1">一室</option>
						<option value="2">二室</option>
						<option value="3">三室</option>
						<option value="4">四室</option>
					</select>
					<select name="hall" >
						<option value="1">一厅</option>
						<option value="2">二厅</option>
						<option value="3">三厅</option>
					</select>
				</td>
			</tr>
			<tr>
			  <td><strong>房屋类型：</strong></td>
				<td>
					<select name="typeId" >
						<option value="">不限</option>
						<option value="1">地下室</option>
						<option value="2">平房</option>
						<option value="3">普通住宅</option>
						<option value="4">公寓</option>
						<option value="5">别墅</option>
					</select>
				</td>
			</tr>
			<tr>
			  <td><strong>联系电话：</strong></td>
				<td><input type="text" name="telephone" id="telephone"> </td>
			</tr>
			<tr>
			  <td><strong>联系人：</strong></td>
				<td><input type="text" name="contact" id="contact"></td>
			</tr>
			
			<tr>
			  <td><strong>房屋信息：</strong></td>
				<td>
					<textarea name="description" id="description" cols="30" rows="5"></textarea>
				</td>
			</tr>
			<tr>
				<td colspan="2">
					<div align="center"><input type="submit" value="提交" class="btn"></div>
				</td>
			</tr>
		</table>
	</form>
	</td>
    <td width="40" background="images/middle4.jpg">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="5"><img src="images/bottom.jpg" width="780" height="82"></td>
  </tr>
</table>
<s:debug></s:debug>
<P align="center">2014 搜房网 版权所有</P>
<br/>
</BODY>
</HTML>